<?php
/**
 *
 */
class Sx_admin_mod extends CI_Model {
	var $username;
	var $userpwd;
	var $userip;
	var $userlogintime;
	

	function __construct() {
		parent::__construct();
	}
	/*
	 * 管理员登录
	 */
	function adminlogin($u,$p){
		$this->username = $u;
		$this->userpwd= $p;
		$this->db->where("admin_uname",$this->username);
		$this->db->where("admin_pwd",$this->userpwd);
		$Q = $this->db->get("sx_admin");
		if ($Q -> num_rows() > 0) {
			return  TRUE;
		} else {
			return  FALSE;
		}
		$Q -> free_result();
		
	}
}
?>